<p>This rule raises an issue when number literals contain unnecessary decimal points (like <code>1.</code>) or trailing zeros after the decimal point
(like <code>1.0</code> or <code>123.000</code>).</p>
<h2>Why is this an issue?</h2>
<p>JavaScript treats number literals like <code>1</code>, <code>1.0</code>, and <code>1.</code> as identical values. Using different formats for the
same number creates inconsistency in your codebase and makes it harder to read.</p>
<p>When developers see <code>1.0</code>, they might wonder if there’s a specific reason for the decimal notation, such as indicating precision or
mathematical context. However, in JavaScript, there’s no functional difference between these representations.</p>
<p>Using the simplest form (<code>1</code> instead of <code>1.0</code>) makes your code:</p>
<ul>
  <li> More consistent across the codebase </li>
  <li> Easier to read and scan </li>
  <li> Shorter and cleaner </li>
  <li> Less likely to cause confusion about intent </li>
</ul>
<p>This is especially important in large codebases where consistency helps developers quickly understand and maintain the code.</p>
<h3>What is the potential impact?</h3>
<p>This issue affects code maintainability and readability. While it doesn’t cause functional problems, inconsistent number formatting can make code
harder to review and maintain, potentially slowing down development and code reviews.</p>
<h3>How to fix?</h3>
<p>Remove unnecessary decimal points and trailing zeros from number literals. Use the simplest form that represents the same value.</p>
<h4>Non-compliant code example</h4>
<pre data-diff-id="1" data-diff-type="noncompliant">
const price = 10.0; // Noncompliant
const count = 42.; // Noncompliant
const amount = 123.000; // Noncompliant
const scientific = 456.00e10; // Noncompliant
</pre>
<h4>Compliant code example</h4>
<pre data-diff-id="1" data-diff-type="compliant">
const price = 10;
const count = 42;
const amount = 123;
const scientific = 456e10;
</pre>
<h3>Documentation</h3>
<ul>
  <li> <a href="https://github.com/sindresorhus/eslint-plugin-unicorn#readme">eslint-plugin-unicorn</a> - Rule <a
  href="https://github.com/sindresorhus/eslint-plugin-unicorn/blob/HEAD/docs/rules/no-zero-fractions.md">no-zero-fractions</a> </li>
  <li> MDN - Number literals - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#numeric_literals">Official
  documentation about JavaScript numeric literals and their syntax</a> </li>
  <li> ESLint - no-floating-decimal - <a href="https://eslint.org/docs/latest/rules/no-floating-decimal">Related ESLint rule that addresses floating
  decimal points</a> </li>
</ul>
